import request from '@/utils/request'
     
//查询所有商户  !!!这些属性需要和后端保持一致
export const merchantQueryApi = (merchantId, merchantName, status, beginTime, endTime, pageNum, pageSize) => 
  request.get(`/merchants/${pageNum}/${pageSize}?merchantId=${merchantId}&merchantName=${merchantName}&status=${status}&beginTime=${beginTime}&endTime=${endTime}`);

//新增商户
export const merchantAddApi = (data) => request.post('/merchants', data);

//删除商户
export const merchantDeleteApi = (id) => request.delete(`/merchants/${id}`);

//根据ID查询商户
export const merchantQueryByIdApi = (id) => request.get(`/merchants/${id}`);

//更新商户
export const merchantUpdateApi = (data) => request.put(data);